<%@ include file="/common/taglibs.jsp"%>
<head>
    <title><fmt:message key="reservaIngresadaList.title"/></title>
    <meta name="heading" content="<fmt:message key='reservaIngresadaList.heading'/>"/>    
</head>

<form:form commandName="reservaform" method="post" id="reservaform" action="stocknoingresoform.html"
	name="reservaform">

<c:set var="buttons">
    <input type="submit" class="button" value="<fmt:message key="button.save"/>"/>        
    <input type="button" class="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />

<br/><br/>
<table cellpadding="0" class="table" cellspacing="0" style="width: 1100px" > 
	<thead> 
		<tr> 
			<th scope="col"><fmt:message key="canjeList.fechadoc"/></th>
            <th scope="col"><fmt:message key="canjeList.estacion"/></th>
            <th scope="col"><fmt:message key="canjeList.almacen"/></th>
            <th scope="col"><fmt:message key="canjeList.nudocumento"/></th>
            <th scope="col"><fmt:message key="canjeList.cliente"/></th>
            <th scope="col"><fmt:message key="canjeList.catalogo"/></th>
            <th scope="col"><fmt:message key="canjeList.premio"/></th>
            <th scope="col"><fmt:message key="canjeList.tarjeta"/></th>
            <th scope="col"><fmt:message key="label.tipodocumento"/></th>
            <th scope="col"><fmt:message key="label.habilitado"/></th>
            <th scope="col"><fmt:message key="common.anulado"/></th>
            <th scope="col"><fmt:message key="common.noingresostock"/></th>
		</tr>
	</thead> 
	<tbody id="reservasbody">
		<c:forEach var="bnreserva" items="${reservaform.documentoDetalle}" varStatus="status">	
			<c:choose>
				  <c:when test="${status.index % 2 == 0}"><tr class="odd" ></c:when>
				  <c:otherwise><tr class="even" ></c:otherwise>
			</c:choose>
            	<td>${bnreserva.daFechaDocumento}</td>
				<td>${bnreserva.deEstacion}</td>
                <td>${bnreserva.deAlmacen}</td>
                <td>${bnreserva.nuSerie} - ${bnreserva.nuDocumento}</td>
                <td>${bnreserva.deCliente}</td>
                <td>${bnreserva.deCatalogo}</td>
                <td>${bnreserva.dePremio}</td>
                <td>${bnreserva.codTarjeta}</td>
                <td>                
                	<c:choose>
                		<c:when test="${bnreserva.stIndicatorTipoDoc eq 'CJ'}">
                			<fmt:message key='common.canje'/>
                		</c:when>
                		<c:when test="${bnreserva.stIndicatorTipoDoc eq 'RS'}">
                			<fmt:message key='common.reserva'/>
                		</c:when>                
                		<c:when test="${bnreserva.stIndicatorTipoDoc eq 'DC'}">
                			<fmt:message key='common.devuelto'/>
                		</c:when>
                	</c:choose>
                </td>                
                <td>                
                	<c:choose>
                		<c:when test="${bnreserva.stDocumentoMovArt eq 'Y'}">
                			<fmt:message key='common.yes'/>
                		</c:when>
                		<c:otherwise>
                			<fmt:message key='common.no'/>
                		</c:otherwise>
                	</c:choose>
                </td>
                <td>
                <c:choose>
                	<c:when test="${bnreserva.stIndicatorTipoDoc eq 'RS' and bnreserva.stDocumentoMovArt eq 'N'}">
                		<fmt:message key='common.yes'/>
                	</c:when>
                	<c:otherwise>
               			<fmt:message key='common.no'/>
               		</c:otherwise>
                </c:choose>                
                </td>
                <td><center>
	                <input type="hidden" name="documentoDetalle[${status.index}].id" id="documentoDetalle[${status.index}].id"  value="<c:out value="${bnreserva.id}"/>" />
    	            <input type="checkbox" name="documentoDetalle[${status.index}].stNoIngresado" id="documentoDetalle[${status.index}].stNoIngresado" />
                </center></td>
           </tr>
        </c:forEach>				
	</tbody>
</table>

<c:out value="${buttons}" escapeXml="false" />
</form:form>